package com.greyu.ysj.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class CbtPayLog implements Serializable {
    private Integer id;

    /**
     * 提现ID
     */
    private Integer drawId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 提现地址
     */
    private String walletAddress;

    /**
     * 提现数量
     */
    private Double cbtAmount;

    /**
     * 提现时间
     */
    private Date drawDate;

    /**
     * 手续费
     */
    private Double fee;

    /**
     * 以太坊价格
     */
    private Double ethPrice;

    /**
     * 兑换成的以太坊数量
     */
    private Double ethAmount;

    /**
     * 交易hash
     */
    private String drawHash;

    /**
     * 支付状态: 0 代表支付失败;1 代表支付成功;2 代表支付中
     */
    private Integer flag;

    /**
     * 支付时间
     */
    private Date payDate;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDrawId() {
        return drawId;
    }

    public void setDrawId(Integer drawId) {
        this.drawId = drawId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getWalletAddress() {
        return walletAddress;
    }

    public void setWalletAddress(String walletAddress) {
        this.walletAddress = walletAddress;
    }

    public Double getCbtAmount() {
        return cbtAmount;
    }

    public void setCbtAmount(Double cbtAmount) {
        this.cbtAmount = cbtAmount;
    }

    public Date getDrawDate() {
        return drawDate;
    }

    public void setDrawDate(Date drawDate) {
        this.drawDate = drawDate;
    }

    public Double getFee() {
        return fee;
    }

    public void setFee(Double fee) {
        this.fee = fee;
    }

    public Double getEthPrice() {
        return ethPrice;
    }

    public void setEthPrice(Double ethPrice) {
        this.ethPrice = ethPrice;
    }

    public Double getEthAmount() {
        return ethAmount;
    }

    public void setEthAmount(Double ethAmount) {
        this.ethAmount = ethAmount;
    }

    public String getDrawHash() {
        return drawHash;
    }

    public void setDrawHash(String drawHash) {
        this.drawHash = drawHash;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CbtPayLog other = (CbtPayLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDrawId() == null ? other.getDrawId() == null : this.getDrawId().equals(other.getDrawId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getWalletAddress() == null ? other.getWalletAddress() == null : this.getWalletAddress().equals(other.getWalletAddress()))
            && (this.getCbtAmount() == null ? other.getCbtAmount() == null : this.getCbtAmount().equals(other.getCbtAmount()))
            && (this.getDrawDate() == null ? other.getDrawDate() == null : this.getDrawDate().equals(other.getDrawDate()))
            && (this.getFee() == null ? other.getFee() == null : this.getFee().equals(other.getFee()))
            && (this.getEthPrice() == null ? other.getEthPrice() == null : this.getEthPrice().equals(other.getEthPrice()))
            && (this.getEthAmount() == null ? other.getEthAmount() == null : this.getEthAmount().equals(other.getEthAmount()))
            && (this.getDrawHash() == null ? other.getDrawHash() == null : this.getDrawHash().equals(other.getDrawHash()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getPayDate() == null ? other.getPayDate() == null : this.getPayDate().equals(other.getPayDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDrawId() == null) ? 0 : getDrawId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getWalletAddress() == null) ? 0 : getWalletAddress().hashCode());
        result = prime * result + ((getCbtAmount() == null) ? 0 : getCbtAmount().hashCode());
        result = prime * result + ((getDrawDate() == null) ? 0 : getDrawDate().hashCode());
        result = prime * result + ((getFee() == null) ? 0 : getFee().hashCode());
        result = prime * result + ((getEthPrice() == null) ? 0 : getEthPrice().hashCode());
        result = prime * result + ((getEthAmount() == null) ? 0 : getEthAmount().hashCode());
        result = prime * result + ((getDrawHash() == null) ? 0 : getDrawHash().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getPayDate() == null) ? 0 : getPayDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", drawId=").append(drawId);
        sb.append(", userId=").append(userId);
        sb.append(", walletAddress=").append(walletAddress);
        sb.append(", cbtAmount=").append(cbtAmount);
        sb.append(", drawDate=").append(drawDate);
        sb.append(", fee=").append(fee);
        sb.append(", ethPrice=").append(ethPrice);
        sb.append(", ethAmount=").append(ethAmount);
        sb.append(", drawHash=").append(drawHash);
        sb.append(", flag=").append(flag);
        sb.append(", payDate=").append(payDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}